#ifndef _RTC_H
#define _RTC_H
#include "stm32f10x.h"
#define ONEDAY_SEC (24*60*60UL)
typedef struct _Time
{
    u32 year;
    u8 mon;
    u8 day;
    u8 hour;
    u8 min;
    u8 sec;
    u8 week;
}RtcTime;

extern RtcTime rtcTime;
void Sec_To_Time(u32 sec);
void RTC_Init(void);
void Time_To_sec(RtcTime *rtc_p);
#endif
